// SPDX-License-Identifier: MIT

@use "../settings/config" as cfg;
@use "../settings/color-scale" as scale;
@use "../settings/color-vars" as vars;

.root {

  // Color scale

  -color-dark:        scale.$dark;
  -color-light:       scale.$light;

  -color-base-0:      scale.$base-0;
  -color-base-1:      scale.$base-1;
  -color-base-2:      scale.$base-2;
  -color-base-3:      scale.$base-3;
  -color-base-4:      scale.$base-4;
  -color-base-5:      scale.$base-5;
  -color-base-6:      scale.$base-6;
  -color-base-7:      scale.$base-7;
  -color-base-8:      scale.$base-8;
  -color-base-9:      scale.$base-9;

  -color-accent-0:    scale.$accent-0;
  -color-accent-1:    scale.$accent-1;
  -color-accent-2:    scale.$accent-2;
  -color-accent-3:    scale.$accent-3;
  -color-accent-4:    scale.$accent-4;
  -color-accent-5:    scale.$accent-5;
  -color-accent-6:    scale.$accent-6;
  -color-accent-7:    scale.$accent-7;
  -color-accent-8:    scale.$accent-8;
  -color-accent-9:    scale.$accent-9;

  -color-success-0:   scale.$success-0;
  -color-success-1:   scale.$success-1;
  -color-success-2:   scale.$success-2;
  -color-success-3:   scale.$success-3;
  -color-success-4:   scale.$success-4;
  -color-success-5:   scale.$success-5;
  -color-success-6:   scale.$success-6;
  -color-success-7:   scale.$success-7;
  -color-success-8:   scale.$success-8;
  -color-success-9:   scale.$success-9;

  -color-warning-0:   scale.$warning-0;
  -color-warning-1:   scale.$warning-1;
  -color-warning-2:   scale.$warning-2;
  -color-warning-3:   scale.$warning-3;
  -color-warning-4:   scale.$warning-4;
  -color-warning-5:   scale.$warning-5;
  -color-warning-6:   scale.$warning-6;
  -color-warning-7:   scale.$warning-7;
  -color-warning-8:   scale.$warning-8;
  -color-warning-9:   scale.$warning-9;

  -color-danger-0:    scale.$danger-0;
  -color-danger-1:    scale.$danger-1;
  -color-danger-2:    scale.$danger-2;
  -color-danger-3:    scale.$danger-3;
  -color-danger-4:    scale.$danger-4;
  -color-danger-5:    scale.$danger-5;
  -color-danger-6:    scale.$danger-6;
  -color-danger-7:    scale.$danger-7;
  -color-danger-8:    scale.$danger-8;
  -color-danger-9:    scale.$danger-9;

  // Functional variables

  -color-fg-default:            vars.$fg-default;
  -color-fg-muted:              vars.$fg-muted;
  -color-fg-subtle:             vars.$fg-subtle;
  -color-fg-emphasis:           vars.$fg-onEmphasis;

  -color-bg-default:            vars.$canvas-default;
  -color-bg-overlay:            vars.$canvas-overlay;
  -color-bg-subtle:             vars.$canvas-subtle;
  -color-bg-inset:              vars.$canvas-inset;

  -color-border-default:        vars.$border-default;
  -color-border-muted:          vars.$border-muted;
  -color-border-subtle:         vars.$border-subtle;
  -color-shadow-default:        vars.$shadow-default;

  -color-neutral-emphasis-plus: vars.$neutral-emphasisPlus;
  -color-neutral-emphasis:      vars.$neutral-emphasis;
  -color-neutral-muted:         vars.$neutral-muted;
  -color-neutral-subtle:        vars.$neutral-subtle;

  -color-accent-fg:             vars.$accent-fg;
  -color-accent-emphasis:       vars.$accent-emphasis;
  -color-accent-muted:          vars.$accent-muted;
  -color-accent-subtle:         vars.$accent-subtle;

  -color-warning-fg:            vars.$warning-fg;
  -color-warning-emphasis:      vars.$warning-emphasis;
  -color-warning-muted:         vars.$warning-muted;
  -color-warning-subtle:        vars.$warning-subtle;

  -color-success-fg:            vars.$success-fg;
  -color-success-emphasis:      vars.$success-emphasis;
  -color-success-muted:         vars.$success-muted;
  -color-success-subtle:        vars.$success-subtle;

  -color-danger-fg:             vars.$danger-fg;
  -color-danger-emphasis:       vars.$danger-emphasis;
  -color-danger-muted:          vars.$danger-muted;
  -color-danger-subtle:         vars.$danger-subtle;

  -color-chart-1:               vars.$chart-1;
  -color-chart-2:               vars.$chart-2;
  -color-chart-3:               vars.$chart-3;
  -color-chart-4:               vars.$chart-4;
  -color-chart-5:               vars.$chart-5;
  -color-chart-6:               vars.$chart-6;
  -color-chart-7:               vars.$chart-7;
  -color-chart-8:               vars.$chart-8;

  -color-chart-1-alpha70:       vars.$chart-1-alpha70;
  -color-chart-2-alpha70:       vars.$chart-2-alpha70;
  -color-chart-3-alpha70:       vars.$chart-3-alpha70;
  -color-chart-4-alpha70:       vars.$chart-4-alpha70;
  -color-chart-5-alpha70:       vars.$chart-5-alpha70;
  -color-chart-6-alpha70:       vars.$chart-6-alpha70;
  -color-chart-7-alpha70:       vars.$chart-7-alpha70;
  -color-chart-8-alpha70:       vars.$chart-8-alpha70;

  -color-chart-1-alpha20:       vars.$chart-1-alpha20;
  -color-chart-2-alpha20:       vars.$chart-2-alpha20;
  -color-chart-3-alpha20:       vars.$chart-3-alpha20;
  -color-chart-4-alpha20:       vars.$chart-4-alpha20;
  -color-chart-5-alpha20:       vars.$chart-5-alpha20;
  -color-chart-6-alpha20:       vars.$chart-6-alpha20;
  -color-chart-7-alpha20:       vars.$chart-7-alpha20;
  -color-chart-8-alpha20:       vars.$chart-8-alpha20;

  // default props inherited by all nodes
  -fx-background-color: -color-bg-default;
  -fx-font-size: cfg.$font-default;

  // these are needed for Popup
  -fx-background-radius: inherit;
  -fx-background-insets: inherit;
  -fx-padding: inherit;

  // make popups transparent
  &.popup {
    -fx-background-color: transparent;
  }
}

// font icons
.ikonli-font-icon {
  -fx-icon-color: -color-fg-default;
  -fx-fill: -color-fg-default;
  -fx-icon-size: cfg.$icon-size;
}

// Hide mnemonic stroke by default. It can only appear when user holds
// Meta button, which adds ":show-mnemonics" pseudo-class to each control
// that set mnemonicParsing = true.
.mnemonic-underline {
  -fx-stroke: transparent;
}
